//
//  LGMainHeartReportView.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2023/11/1.
//

#import "LGMainHeartReportView.h"

#define leftMargin       viewPix(16)
#define titleWidth       30
#define lineHeight        viewPix(30)
#define textFieldWidth        viewPix(32)
#define textFieldHeight       viewPix(28)
#define topMargin        (textFieldHeight - lineHeight)/2.0
#define contentWidth1    (Screen_W-viewPix(32)-viewPix(16)-titleWidth*4)/4.0
#define contentWidth2    (Screen_W-viewPix(32)-viewPix(16)-titleWidth*3)/3.0

@interface LGMainHeartReportView()

/**  二维及M型测值 */
@property (nonatomic , strong)UILabel *titleLabel1;
/**   */
@property (nonatomic , strong)UILabel *lvTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *lvContentTF;
/**   */
@property (nonatomic , strong)UILabel *laTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *laContentTF;
/**   */
@property (nonatomic , strong)UILabel *rvTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *rvContentTF;
/**   */
@property (nonatomic , strong)UILabel *raTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *raContentTF;
/**   */
@property (nonatomic , strong)UILabel *ivsTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *ivsContentTF;
/**   */
@property (nonatomic , strong)UILabel *lvpwTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *lvpwContentTF;
/**   */
@property (nonatomic , strong)UILabel *aoTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *aoContentTF;
/**   */
@property (nonatomic , strong)UILabel *aaoTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *aaoContentTF;
/**   */
@property (nonatomic , strong)UILabel *mpaTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *mpaContentTF;


/**  多普勒测值 */
@property (nonatomic , strong)UILabel *titleLabel2;
/**   */
@property (nonatomic , strong)UILabel *e1TitleLabel;
/**   */
@property (nonatomic , strong)UITextField *e1ContentTF;
/**   */
@property (nonatomic , strong)UILabel *e2TitleLabel;
/**   */
@property (nonatomic , strong)UITextField *e2ContentTF;
/**   */
@property (nonatomic , strong)UILabel *avTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *avContentTF;
/**   */
@property (nonatomic , strong)UILabel *pvTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *pvContentTF;
/**   */
@property (nonatomic , strong)UILabel *eeTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *eeContentTF;
/**   */
@property (nonatomic , strong)UILabel *eeUnitLabel;
/**   */
@property (nonatomic , strong)UILabel *aaTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *aaContentTF;
/**   */
@property (nonatomic , strong)UILabel *aaUnitLabel;
/**   */
@property (nonatomic , strong)UILabel *eeeTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *eeeContentTF;


/**  心功能 */
@property (nonatomic , strong)UILabel *titleLabel3;
/**   */
@property (nonatomic , strong)UILabel *eddTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *eddContentTF;
/**   */
@property (nonatomic , strong)UILabel *eddUnitLabel;
/**   */
@property (nonatomic , strong)UILabel *esdTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *esdContentTF;
/**   */
@property (nonatomic , strong)UILabel *esdUnitLabel;
/**   */
@property (nonatomic , strong)UILabel *edvTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *edvContentTF;
/**   */
@property (nonatomic , strong)UILabel *edvUnitLabel;
/**   */
@property (nonatomic , strong)UILabel *esvTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *esvContentTF;
/**   */
@property (nonatomic , strong)UILabel *esvUnitLabel;
/**   */
@property (nonatomic , strong)UILabel *svTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *svContentTF;
/**   */
@property (nonatomic , strong)UILabel *svUnitLabel;
/**   */
@property (nonatomic , strong)UILabel *efTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *efContentTF;
/**   */
@property (nonatomic , strong)UILabel *efUnitLabel;
/**   */
@property (nonatomic , strong)UILabel *fsTitleLabel;
/**   */
@property (nonatomic , strong)UITextField *fsContentTF;
/**   */
@property (nonatomic , strong)UILabel *fsUnitLabel;
/**   */
@property (nonatomic , strong)NSArray *keyArray;
@end

@implementation LGMainHeartReportView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
        self.keyArray = @[@"d_lv",@"d_la",@"d_rv",@"d_ra",@"d_ivs",@"d_lvpw",@"d_ao",@"d_aao",@"d_mpa",@"d_e1",@"d_e2",@"d_av",@"d_pv",@"d_e3",@"d_a1",@"d_ee",@"d_edd",@"d_esd",@"d_edv",@"d_esv",@"d_sv",@"d_ef",@"d_fs"];
    }
    return self;
}

-(void)setDataDic:(NSMutableDictionary *)dataDic{
    _dataDic = dataDic;
    [self handleData:dataDic[@"d_lv"] textField:self.lvContentTF];
    [self handleData:dataDic[@"d_la"] textField:self.laContentTF];
    [self handleData:dataDic[@"d_rv"] textField:self.rvContentTF];
    [self handleData:dataDic[@"d_ra"] textField:self.raContentTF];
    [self handleData:dataDic[@"d_ivs"] textField:self.ivsContentTF];
    [self handleData:dataDic[@"d_lvpw"] textField:self.lvpwContentTF];
    [self handleData:dataDic[@"d_ao"] textField:self.aoContentTF];
    [self handleData:dataDic[@"d_aao"] textField:self.aaoContentTF];
    [self handleData:dataDic[@"d_mpa"] textField:self.mpaContentTF];
    [self handleData:dataDic[@"d_e1"] textField:self.e1ContentTF];
    [self handleData:dataDic[@"d_e2"] textField:self.e2ContentTF];
    [self handleData:dataDic[@"d_av"] textField:self.avContentTF];
    [self handleData:dataDic[@"d_pv"] textField:self.pvContentTF];
    [self handleData:dataDic[@"d_e3"] textField:self.eeContentTF];
    [self handleData:dataDic[@"d_e3"] textField:self.aaContentTF];
    [self handleData:dataDic[@"d_ee"] textField:self.eeeContentTF];
    [self handleData:dataDic[@"d_edd"] textField:self.eddContentTF];
    [self handleData:dataDic[@"d_esd"] textField:self.esdContentTF];
    [self handleData:dataDic[@"d_edv"] textField:self.edvContentTF];
    [self handleData:dataDic[@"d_esv"] textField:self.esvContentTF];
    [self handleData:dataDic[@"d_sv"] textField:self.svContentTF];
    [self handleData:dataDic[@"d_ef"] textField:self.efContentTF];
    [self handleData:dataDic[@"d_fs"] textField:self.fsContentTF];
}

-(void)handleData:(NSDictionary *)tempDic  textField:(UITextField *)textField{
    NSString *canEdit = LGNSString(tempDic[@"is_editable"]);
    NSString *result = LGNSString(tempDic[@"result"]);
    
    if([canEdit isEqualToString:@"1"]){
        //可编辑
        textField.text = result;
        textField.userInteractionEnabled = YES;
        textField.layer.borderColor = [UIColor colorWithString:@"#E3E3E3"].CGColor;
        if(textField == self.eeContentTF){
            [self.eeUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.eeTitleLabel.mas_right).offset(textFieldWidth+viewPix(2)-15);
            }];
        }else if (textField == self.aaContentTF){
            [self.aaUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.aaTitleLabel.mas_right).offset(textFieldWidth+viewPix(2)-15);
            }];
        }else if (textField == self.eddContentTF){
            [self.eddUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.eddTitleLabel.mas_right).offset(textFieldWidth+viewPix(16));
            }];
        }else if (textField == self.esdContentTF){
            [self.esdUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.esdTitleLabel.mas_right).offset(textFieldWidth+viewPix(16));
            }];
        }else if (textField == self.edvContentTF){
            [self.edvUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.edvTitleLabel.mas_right).offset(textFieldWidth+viewPix(16));
            }];
        }else if (textField == self.esvContentTF){
            [self.esvUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.esvTitleLabel.mas_right).offset(textFieldWidth+viewPix(16));
            }];
        }else if (textField == self.svContentTF){
            [self.svUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.svTitleLabel.mas_right).offset(textFieldWidth+viewPix(16));
            }];
        }else if (textField == self.efContentTF){
            [self.efUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.efTitleLabel.mas_right).offset(textFieldWidth+viewPix(16));
            }];
        }else if (textField == self.fsContentTF){
            [self.fsUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.fsTitleLabel.mas_right).offset(textFieldWidth+viewPix(16));
            }];
        }

    }else{
        //不可编辑
        textField.text = result;
        textField.userInteractionEnabled = NO;
        textField.layer.borderColor = [UIColor clearColor].CGColor;
        CGFloat resultWidth = [result textWidthWithFont:LGFontWeight(13, UIFontWeightMedium) maxHeight:MAXFLOAT];
        if(textField == self.eeContentTF){
            [self.eeUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.eeTitleLabel.mas_right).offset(resultWidth+viewPix(10));
            }];
        }else if (textField == self.aaContentTF){
            [self.aaUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.aaTitleLabel.mas_right).offset(resultWidth+viewPix(10));
            }];
        }else if (textField == self.eddContentTF){
            [self.eddUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.eddTitleLabel.mas_right).offset(resultWidth+viewPix(10));
            }];
        }else if (textField == self.esdContentTF){
            [self.esdUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.esdTitleLabel.mas_right).offset(resultWidth+viewPix(10));
            }];
        }else if (textField == self.edvContentTF){
            [self.edvUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.edvTitleLabel.mas_right).offset(resultWidth+viewPix(10));
            }];
        }else if (textField == self.esvContentTF){
            [self.esvUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.esvTitleLabel.mas_right).offset(resultWidth+viewPix(10));
            }];
        }else if (textField == self.svContentTF){
            [self.svUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.svTitleLabel.mas_right).offset(resultWidth+viewPix(10));
            }];
        }else if (textField == self.efContentTF){
            [self.efUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.efTitleLabel.mas_right).offset(resultWidth+viewPix(10));
            }];
        }else if (textField == self.fsContentTF){
            [self.fsUnitLabel mas_updateConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.fsTitleLabel.mas_right).offset(resultWidth+viewPix(10));
            }];
        }
    }

}


-(void)textFieldEditingChanged:(UITextField *)textField{
    NSInteger index = textField.tag - 1000;
    NSString *key = self.keyArray[index];
    NSMutableDictionary *tempDic = self.dataDic[key];
    [tempDic setValue:textField.text forKey:@"result"];
    [self.dataDic setValue:tempDic forKey:key];
    if(self.heartReportValueChanged){
        self.heartReportValueChanged(self.dataDic);
    }
}

#pragma mark
#pragma mark ====> 创建控件
-(void)createSubView{
    [self addSubview:self.titleLabel1];
    [self addSubview:self.lvTitleLabel];
    [self addSubview:self.lvContentTF];
    [self addSubview:self.laTitleLabel];
    [self addSubview:self.laContentTF];
    [self addSubview:self.rvTitleLabel];
    [self addSubview:self.rvContentTF];
    [self addSubview:self.raTitleLabel];
    [self addSubview:self.raContentTF];
    [self addSubview:self.ivsTitleLabel];
    [self addSubview:self.ivsContentTF];
    [self addSubview:self.lvpwTitleLabel];
    [self addSubview:self.lvpwContentTF];
    [self addSubview:self.aoTitleLabel];
    [self addSubview:self.aoContentTF];
    [self addSubview:self.aaoTitleLabel];
    [self addSubview:self.aaoContentTF];
    [self addSubview:self.mpaTitleLabel];
    [self addSubview:self.mpaContentTF];
    
    [self addSubview:self.titleLabel2];
    [self addSubview:self.e1TitleLabel];
    [self addSubview:self.e1ContentTF];
    [self addSubview:self.e2TitleLabel];
    [self addSubview:self.e2ContentTF];
    [self addSubview:self.avTitleLabel];
    [self addSubview:self.avContentTF];
    [self addSubview:self.pvTitleLabel];
    [self addSubview:self.pvContentTF];
    [self addSubview:self.eeTitleLabel];
    [self addSubview:self.eeContentTF];
    [self addSubview:self.eeUnitLabel];
    [self addSubview:self.aaTitleLabel];
    [self addSubview:self.aaContentTF];
    [self addSubview:self.aaUnitLabel];
    [self addSubview:self.eeeTitleLabel];
    [self addSubview:self.eeeContentTF];
    
    [self addSubview:self.titleLabel3];
    [self addSubview:self.eddTitleLabel];
    [self addSubview:self.eddContentTF];
    [self addSubview:self.eddUnitLabel];
    [self addSubview:self.esdTitleLabel];
    [self addSubview:self.esdContentTF];
    [self addSubview:self.esdUnitLabel];
    [self addSubview:self.edvTitleLabel];
    [self addSubview:self.edvContentTF];
    [self addSubview:self.edvUnitLabel];
    [self addSubview:self.esvTitleLabel];
    [self addSubview:self.esvContentTF];
    [self addSubview:self.esvUnitLabel];
    [self addSubview:self.svTitleLabel];
    [self addSubview:self.svContentTF];
    [self addSubview:self.svUnitLabel];
    [self addSubview:self.efTitleLabel];
    [self addSubview:self.efContentTF];
    [self addSubview:self.efUnitLabel];
    [self addSubview:self.fsTitleLabel];
    [self addSubview:self.fsContentTF];
    [self addSubview:self.fsUnitLabel];
    [self.eeUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.eeTitleLabel.mas_right).offset(5);
        make.centerY.equalTo(self.eeTitleLabel);
    }];
    
    [self.aaUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.aaTitleLabel.mas_right).offset(5);
        make.centerY.equalTo(self.aaTitleLabel);
    }];
    
    [self.eddUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.eddTitleLabel.mas_right).offset(5);
        make.centerY.equalTo(self.eddTitleLabel);
    }];
    
    [self.esdUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.esdTitleLabel.mas_right).offset(5);
        make.centerY.equalTo(self.esdTitleLabel);
    }];
    
    [self.edvUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.edvTitleLabel.mas_right).offset(5);
        make.centerY.equalTo(self.edvTitleLabel);
    }];
    
    [self.esvUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.esvTitleLabel.mas_right).offset(5);
        make.centerY.equalTo(self.esvTitleLabel);
    }];
    
    [self.svUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.svTitleLabel.mas_right).offset(5);
        make.centerY.equalTo(self.svTitleLabel);
    }];
    
    [self.efUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.efTitleLabel.mas_right).offset(5);
        make.centerY.equalTo(self.efTitleLabel);
    }];
    
    [self.fsUnitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.fsTitleLabel.mas_right).offset(5);
        make.centerY.equalTo(self.fsTitleLabel);
    }];
}
-(UILabel *)titleLabel1{
    if(!_titleLabel1){
        _titleLabel1 = [UILabel lableWithText:@"二维及M型测值(径线mm，面积cm3)：" colorString:@"#333333" textFont:LGFontWeight(13, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
        _titleLabel1.frame = CGRectMake(viewPix(16), viewPix(5), Screen_W-viewPix(64), 20);
    }
    return _titleLabel1;
}

-(UILabel *)lvTitleLabel{
    if(!_lvTitleLabel){
        _lvTitleLabel = [UILabel lableWithText:@"LV" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _lvTitleLabel.frame = CGRectMake(viewPix(16), kMaxY(self.titleLabel1.frame)+12, titleWidth, lineHeight);
    }
    return _lvTitleLabel;
}

-(UITextField *)lvContentTF{
    if(!_lvContentTF){
        _lvContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.lvTitleLabel.frame), kMinY(self.lvTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _lvContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _lvContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _lvContentTF.textAlignment = NSTextAlignmentCenter;
        _lvContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _lvContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _lvContentTF.layer.borderWidth = 1;
        _lvContentTF.cornerRidus = 5;
        _lvContentTF.tag = 1000;
        [_lvContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _lvContentTF;
}



-(UILabel *)laTitleLabel{
    if(!_laTitleLabel){
        _laTitleLabel = [UILabel lableWithText:@"LA" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _laTitleLabel.frame = CGRectMake(kMaxX(self.lvTitleLabel.frame)+contentWidth1, kMinY(self.lvTitleLabel.frame), titleWidth+10, lineHeight);
    }
    return _laTitleLabel;
}

-(UITextField *)laContentTF{
    if(!_laContentTF){
        _laContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.laTitleLabel.frame), kMinY(self.lvTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _laContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _laContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _laContentTF.textAlignment = NSTextAlignmentCenter;
        _laContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _laContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _laContentTF.layer.borderWidth = 1;
        _laContentTF.cornerRidus = 5;
        _laContentTF.tag = 1001;
        [_laContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _laContentTF;
}

-(UILabel *)rvTitleLabel{
    if(!_rvTitleLabel){
        _rvTitleLabel = [UILabel lableWithText:@"RV" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _rvTitleLabel.frame = CGRectMake(kMaxX(self.laTitleLabel.frame)+contentWidth1, kMinY(self.lvTitleLabel.frame), titleWidth, lineHeight);
    }
    return _rvTitleLabel;
}

-(UITextField *)rvContentTF{
    if(!_rvContentTF){
        _rvContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.rvTitleLabel.frame), kMinY(self.lvTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _rvContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _rvContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _rvContentTF.textAlignment = NSTextAlignmentCenter;
        _rvContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _rvContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _rvContentTF.layer.borderWidth = 1;
        _rvContentTF.cornerRidus = 5;
        _rvContentTF.tag = 1002;
        [_rvContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _rvContentTF;
}

-(UILabel *)raTitleLabel{
    if(!_raTitleLabel){
        _raTitleLabel = [UILabel lableWithText:@"RA" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _raTitleLabel.frame = CGRectMake(kMaxX(self.rvTitleLabel.frame)+contentWidth1, kMinY(self.lvTitleLabel.frame), titleWidth, lineHeight);
    }
    return _raTitleLabel;
}

-(UITextField *)raContentTF{
    if(!_raContentTF){
        _raContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.raTitleLabel.frame), kMinY(self.lvTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _raContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _raContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _raContentTF.textAlignment = NSTextAlignmentCenter;
        _raContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _raContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _raContentTF.layer.borderWidth = 1;
        _raContentTF.cornerRidus = 5;
        _raContentTF.tag = 1003;
        [_raContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _raContentTF;
}


-(UILabel *)ivsTitleLabel{
    if(!_ivsTitleLabel){
        _ivsTitleLabel = [UILabel lableWithText:@"IVS" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _ivsTitleLabel.frame = CGRectMake(viewPix(16), kMaxY(self.lvTitleLabel.frame)+12, titleWidth, lineHeight);
    }
    return _ivsTitleLabel;
}

-(UITextField *)ivsContentTF{
    if(!_ivsContentTF){
        _ivsContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.ivsTitleLabel.frame), kMinY(self.ivsTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _ivsContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _ivsContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _ivsContentTF.textAlignment = NSTextAlignmentCenter;
        _ivsContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _ivsContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _ivsContentTF.layer.borderWidth = 1;
        _ivsContentTF.cornerRidus = 5;
        _ivsContentTF.tag = 1004;
        [_ivsContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _ivsContentTF;
}


-(UILabel *)lvpwTitleLabel{
    if(!_lvpwTitleLabel){
        _lvpwTitleLabel = [UILabel lableWithText:@"LVPW" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _lvpwTitleLabel.frame = CGRectMake(kMaxX(self.ivsTitleLabel.frame)+contentWidth1, kMinY(self.ivsTitleLabel.frame), titleWidth+10, lineHeight);
    }
    return _lvpwTitleLabel;
}

-(UITextField *)lvpwContentTF{
    if(!_lvpwContentTF){
        _lvpwContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.lvpwTitleLabel.frame), kMinY(self.ivsTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _lvpwContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _lvpwContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _lvpwContentTF.textAlignment = NSTextAlignmentCenter;
        _lvpwContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _lvpwContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _lvpwContentTF.layer.borderWidth = 1;
        _lvpwContentTF.cornerRidus = 5;
        _lvpwContentTF.tag = 1005;
        [_lvpwContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _lvpwContentTF;
}

-(UILabel *)aoTitleLabel{
    if(!_aoTitleLabel){
        _aoTitleLabel = [UILabel lableWithText:@"AO" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _aoTitleLabel.frame = CGRectMake(kMaxX(self.lvpwTitleLabel.frame)+contentWidth1, kMinY(self.ivsTitleLabel.frame), titleWidth, lineHeight);
    }
    return _aoTitleLabel;
}

-(UITextField *)aoContentTF{
    if(!_aoContentTF){
        _aoContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.aoTitleLabel.frame), kMinY(self.ivsTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _aoContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _aoContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _aoContentTF.textAlignment = NSTextAlignmentCenter;
        _aoContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _aoContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _aoContentTF.layer.borderWidth = 1;
        _aoContentTF.cornerRidus = 5;
        _aoContentTF.tag = 1006;
        [_aoContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _aoContentTF;
}


-(UILabel *)aaoTitleLabel{
    if(!_aaoTitleLabel){
        _aaoTitleLabel = [UILabel lableWithText:@"AAO" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _aaoTitleLabel.frame = CGRectMake(kMaxX(self.aoTitleLabel.frame)+contentWidth1, kMinY(self.ivsTitleLabel.frame), titleWidth, lineHeight);
    }
    return _aaoTitleLabel;
}

-(UITextField *)aaoContentTF{
    if(!_aaoContentTF){
        _aaoContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.aaoTitleLabel.frame), kMinY(self.ivsTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _aaoContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _aaoContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _aaoContentTF.textAlignment = NSTextAlignmentCenter;
        _aaoContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _aaoContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _aaoContentTF.layer.borderWidth = 1;
        _aaoContentTF.cornerRidus = 5;
        _aaoContentTF.tag = 1007;
        [_aaoContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _aaoContentTF;
}


-(UILabel *)mpaTitleLabel{
    if(!_mpaTitleLabel){
        _mpaTitleLabel = [UILabel lableWithText:@"MPA" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _mpaTitleLabel.frame = CGRectMake(viewPix(16), kMaxY(self.ivsTitleLabel.frame)+12, titleWidth, lineHeight);
    }
    return _mpaTitleLabel;
}

-(UITextField *)mpaContentTF{
    if(!_mpaContentTF){
        _mpaContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.mpaTitleLabel.frame), kMinY(self.mpaTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _mpaContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _mpaContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _mpaContentTF.textAlignment = NSTextAlignmentCenter;
        _mpaContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _mpaContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _mpaContentTF.layer.borderWidth = 1;
        _mpaContentTF.cornerRidus = 5;
        _mpaContentTF.tag = 1008;
        [_mpaContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _mpaContentTF;
}



////

-(UILabel *)titleLabel2{
    if(!_titleLabel2){
        _titleLabel2 = [UILabel lableWithText:@"多普勒测值(速度m/s，压差mmHg):" colorString:@"#333333" textFont:LGFontWeight(13, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
        _titleLabel2.frame = CGRectMake(viewPix(16), kMaxY(self.titleLabel1.frame)+132, Screen_W-viewPix(64), 20);
    }
    return _titleLabel2;
}


-(UILabel *)e1TitleLabel{
    if(!_e1TitleLabel){
        _e1TitleLabel = [UILabel lableWithText:@"E" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _e1TitleLabel.frame = CGRectMake(viewPix(16), kMaxY(self.titleLabel2.frame)+8, titleWidth, lineHeight);
    }
    return _e1TitleLabel;
}

-(UITextField *)e1ContentTF{
    if(!_e1ContentTF){
        _e1ContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.e1TitleLabel.frame)-15, kMinY(self.e1TitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _e1ContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _e1ContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _e1ContentTF.textAlignment = NSTextAlignmentCenter;
        _e1ContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _e1ContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _e1ContentTF.layer.borderWidth = 1;
        _e1ContentTF.cornerRidus = 5;
        _e1ContentTF.tag = 1009;
        [_e1ContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _e1ContentTF;
}


-(UILabel *)e2TitleLabel{
    if(!_e2TitleLabel){
        _e2TitleLabel = [UILabel lableWithText:@"A" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _e2TitleLabel.frame = CGRectMake(kMaxX(self.e1TitleLabel.frame)+contentWidth1, kMinY(self.e1TitleLabel.frame), titleWidth, lineHeight);
    }
    return _e2TitleLabel;
}

-(UITextField *)e2ContentTF{
    if(!_e2ContentTF){
        _e2ContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.e2TitleLabel.frame)-15, kMinY(self.e1TitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _e2ContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _e2ContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _e2ContentTF.textAlignment = NSTextAlignmentCenter;
        _e2ContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _e2ContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _e2ContentTF.layer.borderWidth = 1;
        _e2ContentTF.cornerRidus = 5;
        _e2ContentTF.tag = 1010;
        [_e2ContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _e2ContentTF;
}


-(UILabel *)avTitleLabel{
    if(!_avTitleLabel){
        _avTitleLabel = [UILabel lableWithText:@"AV" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _avTitleLabel.frame = CGRectMake(kMaxX(self.e2TitleLabel.frame)+contentWidth1, kMinY(self.e1TitleLabel.frame), titleWidth, lineHeight);
    }
    return _avTitleLabel;
}

-(UITextField *)avContentTF{
    if(!_avContentTF){
        _avContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.avTitleLabel.frame), kMinY(self.e1TitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _avContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _avContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _avContentTF.textAlignment = NSTextAlignmentCenter;
        _avContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _avContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _avContentTF.layer.borderWidth = 1;
        _avContentTF.cornerRidus = 5;
        _avContentTF.tag = 1011;
        [_avContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _avContentTF;
}

-(UILabel *)pvTitleLabel{
    if(!_pvTitleLabel){
        _pvTitleLabel = [UILabel lableWithText:@"PV" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _pvTitleLabel.frame = CGRectMake(kMaxX(self.avTitleLabel.frame)+contentWidth1, kMinY(self.e1TitleLabel.frame), titleWidth, lineHeight);
    }
    return _pvTitleLabel;
}

-(UITextField *)pvContentTF{
    if(!_pvContentTF){
        _pvContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.pvTitleLabel.frame), kMinY(self.e1TitleLabel.frame)-topMargin, textFieldWidth+viewPix(10), textFieldHeight)];
        _pvContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _pvContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _pvContentTF.textAlignment = NSTextAlignmentCenter;
        _pvContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _pvContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _pvContentTF.layer.borderWidth = 1;
        _pvContentTF.cornerRidus = 5;
        _pvContentTF.tag = 1012;
        [_pvContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _pvContentTF;
}

-(UILabel *)eeTitleLabel{
    if(!_eeTitleLabel){
        _eeTitleLabel = [UILabel lableWithText:@"e’" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _eeTitleLabel.frame = CGRectMake(viewPix(16), kMaxY(self.e1TitleLabel.frame)+12, titleWidth, lineHeight);
    }
    return _eeTitleLabel;
}

-(UITextField *)eeContentTF{
    if(!_eeContentTF){
        _eeContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.eeTitleLabel.frame)-15, kMinY(self.eeTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _eeContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _eeContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _eeContentTF.textAlignment = NSTextAlignmentCenter;
        _eeContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _eeContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _eeContentTF.layer.borderWidth = 1;
        _eeContentTF.cornerRidus = 5;
        _eeContentTF.tag = 1013;
        [_eeContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _eeContentTF;
}

-(UILabel *)eeUnitLabel{
    if(!_eeUnitLabel){
        _eeUnitLabel = [UILabel lableWithText:@"cm/s" colorString:@"#999999" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _eeUnitLabel;
}

-(UILabel *)aaTitleLabel{
    if(!_aaTitleLabel){
        _aaTitleLabel = [UILabel lableWithText:@"a’" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _aaTitleLabel.frame = CGRectMake(kMaxX(self.eeTitleLabel.frame)+contentWidth1, kMinY(self.eeTitleLabel.frame), titleWidth, lineHeight);
    }
    return _aaTitleLabel;
}

-(UITextField *)aaContentTF{
    if(!_aaContentTF){
        _aaContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.aaTitleLabel.frame)-15, kMinY(self.eeTitleLabel.frame)-topMargin, textFieldWidth, textFieldHeight)];
        _aaContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _aaContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _aaContentTF.textAlignment = NSTextAlignmentCenter;
        _aaContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _aaContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _aaContentTF.layer.borderWidth = 1;
        _aaContentTF.cornerRidus = 5;
        _aaContentTF.tag = 1014;
        [_aaContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _aaContentTF;
}

-(UILabel *)aaUnitLabel{
    if(!_aaUnitLabel){
        _aaUnitLabel = [UILabel lableWithText:@"cm/s" colorString:@"#999999" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _aaUnitLabel;
}

-(UILabel *)eeeTitleLabel{
    if(!_eeeTitleLabel){
        _eeeTitleLabel = [UILabel lableWithText:@"E/e’" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _eeeTitleLabel.frame = CGRectMake(kMaxX(self.aaTitleLabel.frame)+contentWidth1, kMinY(self.eeTitleLabel.frame), titleWidth, lineHeight);
    }
    return _eeeTitleLabel;
}

-(UITextField *)eeeContentTF{
    if(!_eeeContentTF){
        _eeeContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.eeeTitleLabel.frame), kMinY(self.eeTitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _eeeContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _eeeContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _eeeContentTF.textAlignment = NSTextAlignmentCenter;
        _eeeContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _eeeContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _eeeContentTF.layer.borderWidth = 1;
        _eeeContentTF.cornerRidus = 5;
        _eeeContentTF.tag = 1015;
        [_eeeContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _eeeContentTF;
}


//////
-(UILabel *)titleLabel3{
    if(!_titleLabel3){
        _titleLabel3 = [UILabel lableWithText:@"心功能：" colorString:@"#333333" textFont:LGFontWeight(13, UIFontWeightMedium) textAlignment:NSTextAlignmentLeft lines:1];
        _titleLabel3.frame = CGRectMake(viewPix(16), kMaxY(self.titleLabel2.frame)+96, Screen_W-viewPix(64), 20);
    }
    return _titleLabel3;
}

-(UILabel *)eddTitleLabel{
    if(!_eddTitleLabel){
        _eddTitleLabel = [UILabel lableWithText:@"EDD" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _eddTitleLabel.frame = CGRectMake(viewPix(16), kMaxY(self.titleLabel3.frame)+8, titleWidth, lineHeight);
    }
    return _eddTitleLabel;
}

-(UITextField *)eddContentTF{
    if(!_eddContentTF){
        _eddContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.eddTitleLabel.frame), kMinY(self.eddTitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _eddContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _eddContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _eddContentTF.textAlignment = NSTextAlignmentCenter;
        _eddContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _eddContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _eddContentTF.layer.borderWidth = 1;
        _eddContentTF.cornerRidus = 5;
        _eddContentTF.tag = 1016;
        [_eddContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _eddContentTF;
}

-(UILabel *)eddUnitLabel{
    if(!_eddUnitLabel){
        _eddUnitLabel = [UILabel lableWithText:@"mm" colorString:@"#999999" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _eddUnitLabel;
}

-(UILabel *)esdTitleLabel{
    if(!_esdTitleLabel){
        _esdTitleLabel = [UILabel lableWithText:@"ESD" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _esdTitleLabel.frame = CGRectMake(kMaxX(self.eddTitleLabel.frame)+contentWidth2, kMinY(self.eddTitleLabel.frame), titleWidth, lineHeight);
    }
    return _esdTitleLabel;
}

-(UITextField *)esdContentTF{
    if(!_esdContentTF){
        _esdContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.esdTitleLabel.frame), kMinY(self.eddTitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _esdContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _esdContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _esdContentTF.textAlignment = NSTextAlignmentCenter;
        _esdContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _esdContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _esdContentTF.layer.borderWidth = 1;
        _esdContentTF.cornerRidus = 5;
        _esdContentTF.tag = 1017;
        [_esdContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _esdContentTF;
}
-(UILabel *)esdUnitLabel{
    if(!_esdUnitLabel){
        _esdUnitLabel = [UILabel lableWithText:@"mm" colorString:@"#999999" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _esdUnitLabel;
}

-(UILabel *)edvTitleLabel{
    if(!_edvTitleLabel){
        _edvTitleLabel = [UILabel lableWithText:@"EDV" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _edvTitleLabel.frame = CGRectMake(kMaxX(self.esdTitleLabel.frame)+contentWidth2, kMinY(self.eddTitleLabel.frame), titleWidth, lineHeight);
    }
    return _edvTitleLabel;
}

-(UITextField *)edvContentTF{
    if(!_edvContentTF){
        _edvContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.edvTitleLabel.frame), kMinY(self.eddTitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _edvContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _edvContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _edvContentTF.textAlignment = NSTextAlignmentCenter;
        _edvContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _edvContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _edvContentTF.layer.borderWidth = 1;
        _edvContentTF.cornerRidus = 5;
        _edvContentTF.tag = 1018;
        [_edvContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _edvContentTF;
}
-(UILabel *)edvUnitLabel{
    if(!_edvUnitLabel){
        _edvUnitLabel = [UILabel lableWithText:@"ml" colorString:@"#999999" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _edvUnitLabel;
}

-(UILabel *)esvTitleLabel{
    if(!_esvTitleLabel){
        _esvTitleLabel = [UILabel lableWithText:@"ESV" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _esvTitleLabel.frame = CGRectMake(viewPix(16), kMaxY(self.eddTitleLabel.frame)+12, titleWidth, lineHeight);
    }
    return _esvTitleLabel;
}

-(UITextField *)esvContentTF{
    if(!_esvContentTF){
        _esvContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.esvTitleLabel.frame), kMinY(self.esvTitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _esvContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _esvContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _esvContentTF.textAlignment = NSTextAlignmentCenter;
        _esvContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _esvContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _esvContentTF.layer.borderWidth = 1;
        _esvContentTF.cornerRidus = 5;
        _esvContentTF.tag = 1019;
        [_esvContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _esvContentTF;
}

-(UILabel *)esvUnitLabel{
    if(!_esvUnitLabel){
        _esvUnitLabel = [UILabel lableWithText:@"ml" colorString:@"#999999" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _esvUnitLabel;
}

-(UILabel *)svTitleLabel{
    if(!_svTitleLabel){
        _svTitleLabel = [UILabel lableWithText:@"SV" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _svTitleLabel.frame = CGRectMake(kMaxX(self.esvTitleLabel.frame)+contentWidth2, kMinY(self.esvTitleLabel.frame), titleWidth, lineHeight);
    }
    return _svTitleLabel;
}

-(UITextField *)svContentTF{
    if(!_svContentTF){
        _svContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.svTitleLabel.frame), kMinY(self.esvTitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _svContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _svContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _svContentTF.textAlignment = NSTextAlignmentCenter;
        _svContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _svContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _svContentTF.layer.borderWidth = 1;
        _svContentTF.cornerRidus = 5;
        _svContentTF.tag = 1020;
        [_svContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _svContentTF;
}

-(UILabel *)svUnitLabel{
    if(!_svUnitLabel){
        _svUnitLabel = [UILabel lableWithText:@"ml" colorString:@"#999999" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _svUnitLabel;
}

-(UILabel *)efTitleLabel{
    if(!_efTitleLabel){
        _efTitleLabel = [UILabel lableWithText:@"EF" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _efTitleLabel.frame = CGRectMake(kMaxX(self.svTitleLabel.frame)+contentWidth2, kMinY(self.esvTitleLabel.frame), titleWidth, lineHeight);
    }
    return _efTitleLabel;
}

-(UITextField *)efContentTF{
    if(!_efContentTF){
        _efContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.efTitleLabel.frame), kMinY(self.esvTitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _efContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _efContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _efContentTF.textAlignment = NSTextAlignmentCenter;
        _efContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _efContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _efContentTF.layer.borderWidth = 1;
        _efContentTF.cornerRidus = 5;
        _efContentTF.tag = 1021;
        [_efContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _efContentTF;
}
-(UILabel *)efUnitLabel{
    if(!_efUnitLabel){
        _efUnitLabel = [UILabel lableWithText:@"%" colorString:@"#999999" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _efUnitLabel;
}

-(UILabel *)fsTitleLabel{
    if(!_fsTitleLabel){
        _fsTitleLabel = [UILabel lableWithText:@"FS" colorString:@"#666666" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
        _fsTitleLabel.frame = CGRectMake(viewPix(16), kMaxY(self.esvTitleLabel.frame)+12, titleWidth, lineHeight);
    }
    return _fsTitleLabel;
}


-(UITextField *)fsContentTF{
    if(!_fsContentTF){
        _fsContentTF = [[UITextField alloc]initWithFrame:CGRectMake(kMaxX(self.fsTitleLabel.frame), kMinY(self.fsTitleLabel.frame)-topMargin, textFieldWidth+viewPix(14), textFieldHeight)];
        _fsContentTF.tintColor = [UIColor colorWithString:@"#333333"];
        _fsContentTF.textColor = [UIColor colorWithString:@"#333333"];
        _fsContentTF.textAlignment = NSTextAlignmentCenter;
        _fsContentTF.keyboardType = UIKeyboardTypeDecimalPad;
        _fsContentTF.font = LGFontWeight(13, UIFontWeightMedium);
        _fsContentTF.layer.borderWidth = 1;
        _fsContentTF.cornerRidus = 5;
        _fsContentTF.tag = 1022;
        [_fsContentTF addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged];
    }
    return _fsContentTF;
}

-(UILabel *)fsUnitLabel{
    if(!_fsUnitLabel){
        _fsUnitLabel = [UILabel lableWithText:@"%" colorString:@"#999999" textFont:LGFont(13) textAlignment:NSTextAlignmentLeft lines:1];
    }
    return _fsUnitLabel;
}

@end
